import { findHeadCategory } from '@/api/home'
export default {
  namespaced: true,
  state: {
    cateList: []
  },
  mutations: {
    updateCateList (state, cateList) {
      state.cateList = cateList
    }
  },
  actions: {
    async getCateList ({ commit }) {
      const { result } = await findHeadCategory()
      // console.log(result)
      commit('updateCateList', result)
    }
  }
}
